package n50_atomic;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author fu
 * @date 2022-02-03 14:49
 * 概要：
 * ---------------------------------------------------------------
 * |                                                              |
 * |                  |
 * |                                                             |
 * |=============================================================
 */
public class T2_AtomicInteger_updateAndGet复杂运算 {

    public static void main(String[] args) {

        AtomicInteger i = new AtomicInteger(5);

        i.updateAndGet(x -> x * 10 + x * 2);

        System.out.println(i); // 60
    }
}
